/*
 * @Author: xianfuyou
 * @Date: 2022-04-01 11:15:53
 * @LastEditors: your name
 * @LastEditTime: 2022-04-07 11:39:15
 * @Description: file content
 */
import React, { useState } from 'react'
import { Modal, Form, Input, Row, Col } from 'antd'
import './css/Model.css'

const { TextArea } = Input

export default function DelModel(props) {
  const { isShow, pHandleOk, pHandleCancel, followId } = props
  console.log(followId)
  const [form] = Form.useForm()
  const handleOk = () => {
    console.log(form.getFieldValue('reason'))
    pHandleOk(false);
  };

  const handleCancel = () => {
    pHandleCancel(false);
  };

  return (
    <div>
      <Modal
        className="xfy_dep_add_modal del_order"
        title="删除原因"
        okText="保存"
        cancelText="关闭"
        onOk={handleOk}
        onCancel={handleCancel}
        afterClose={() => { form.resetFields() }}
        visible={isShow}
        destroyOnClose={true}
        forceRender={true}
      >
        <Form preserve={false} form={form}>
          <Row justify={'center'}>
            <Col className={'title'}>
              填写订单删除原因
            </Col>
            <Col span={24}>
              <Form.Item name="reason">
                <TextArea rows={4}>
                </TextArea>
              </Form.Item>
            </Col>
            {/* <Col span={24} className={'hint'}>
              提示：将同时删除订单商品记录和对应财务记录，对应订单商品将会退回库存数量
            </Col> */}
          </Row>
        </Form>
      </Modal>
    </div>
  )
}
